package stai6271;

import java.util.Date;

import com.mongodb.DB;
import com.mongodb.DBCollection;
import com.mongodb.MongoClient;

public class MongoQueryManager {

	private static long startLoad = 0;
	private static long endLoad = 0;
	static DBCollection coll = null;
	
	/**
	 * @param args
	 */
	public static void main(String[] args) {
		
		MongoClient client = MongoDbManager.getMongoConnection();
		
		DB db = client.getDB("test");
		
		coll = db.getCollection("bicycle");
		
		startLoad = System.nanoTime();
		MongoDbManager.getRow(coll, "_id", "bicycle10000");
		
		endLoad = System.nanoTime();
		System.out.println("Query took " + (endLoad - startLoad)/1000000 + " ms.");
		
		client.close();

	}

}
